package spring.inter.impl;

import spring.inter.Ink;
import spring.inter.Paper;

/**
 * @author 吴阳基
 * @datetime 2024/1/10 9:34
 */
public class Printer {
    private Ink ink = null;
    private Paper paper = null;

    public void print(String message) {
        System.out.println("使用" + ink.getColor(255, 200, 0) + "颜色打印：\n");
        for (int i = 0; i < message.length(); i++) {
            paper.putInChar(message.charAt(i));

        }
        System.out.println(paper.getContent());
    }

    public Ink getInk() {
        return ink;
    }

    public void setInk(Ink ink) {
        this.ink = ink;
    }

    public Paper getPaper() {
        return paper;
    }

    public void setPaper(Paper paper) {
        this.paper = paper;
    }
}
